
 begintownscript;

 variables;

 int i,j,k,r1,choice;

 body;

 beginstate INIT_STATE;

	if (get_flag(12,1) > 0) {
		erase_char(6);
		activate_hidden_group(3);
}

	set_level(6,35);
	set_level(18,30);
	set_level(20,35);

	if ((character_in_party(9889) >= 0) || (character_in_party(9865) >= 0))
		erase_char(20);
break;

 beginstate START_STATE;

	if (get_ran(1,0,100) < 6)
		text_bubble_on_char(6,"*Gurgle*");

	if ((char_ok(18) == FALSE) && (get_flag(12,2) == 0)) {
		activate_hidden_group(1);
		set_flag(12,2,1);
		message_dialog("You hear a dripping oozing sound coming from above your heads. A drop of slime drops on your helmet. You look up. A vicious looking giant slug has attached itself on the cave ceiling.","With one swift move it drops to the ground and attacks you.");
		set_level(19,40);
}


break;

 beginstate EXIT_STATE;

break;

 beginstate 10;
	if (get_flag(12,0) == 0) {
		message_dialog("You hear a strange gurgling, sneezing sound. You take another step, prepared to face whatever monsters might occupy this cave. You hear the sneeze again. It's coming from your left. You see a giant slug cramped in a corner.","It looks deflated, and its eyes are hanging from both sides of its head. Its breathing heavily and coughing up acid balls, incidentally it's not doing it willingly. The creature is defiantly sick.");
		set_flag(12,0,1);
}

	if ((character_in_party(9889) >= 0) || (character_in_party(9865) >= 0)) {
		reset_dialog();
		add_dialog_str(0,"This is the giant slugs' home. If you wanted to, you could see if you can get it to remain here.",0);
		add_dialog_choice(0,"Part with the slug.");
		add_dialog_choice(1,"No, let the slug stay.");
		choice = run_dialog(1);
	if (choice == 1) {
		remove_char_from_party(9889);
		remove_char_from_party(9865);
		activate_hidden_group(3);
}
}
break;

 beginstate 11;
	 if (get_flag(12,3) == 0) {
		message_dialog("These caverns are incredibly moist and therefore humid. Such conditions make it a very damp and swampy place. The conditions, being what they are, seem to be heaven to giant slugs.","");
		set_flag(12,3,1);
}
 break;

 beginstate 12;
	if (get_flag(12,4) == 0) {
		message_dialog("The air gets even more damp. You also smell something other than oxygen. Strange gases are erupting from the soil. Whatever they are, they haven't done anything good to the fungus.","");
		set_flag(12,4,1);
}
 break; 